package com.sskj.finance.bean;

import com.sskj.lib.util.CoinUtil;

import java.util.List;

public class AccountBean {

    /**
     * ttl_money : 2117.6576
     * ttl_cnymoney : 14611.84
     * asset : [{"pid":"1","mark":"USDT","usable":"372.37760000","frost":"0.00000000"},{"pid":"3","mark":"ETH","usable":"9.00000000","frost":"0.00000000"},{"pid":"2","mark":"BTC","usable":"0.00000000","frost":"0.00000000"},{"pid":"10","mark":"CQTF","usable":"34.40000000","frost":"0.00000000"}]
     */

    private String ttl_money;
    private String ttl_cnymoney;
    private List<AssetBean> asset;

    public String getTtl_money() {
        return ttl_money;
    }

    public void setTtl_money(String ttl_money) {
        this.ttl_money = ttl_money;
    }

    public String getTtl_cnymoney() {
        return ttl_cnymoney;
    }

    public void setTtl_cnymoney(String ttl_cnymoney) {
        this.ttl_cnymoney = ttl_cnymoney;
    }

    public List<AssetBean> getAsset() {
        return asset;
    }

    public void setAsset(List<AssetBean> asset) {
        this.asset = asset;
    }

    public static class AssetBean {
        /**
         * pid : 1
         * mark : USDT
         * usable : 372.37760000
         * frost : 0.00000000
         */

        private String pid;
        private String mark;
        private String usable;
        private String frost;

        public String getPid() {
            return pid;
        }

        public void setPid(String pid) {
            this.pid = pid;
        }

        public String getMark() {
            return mark;
        }

        public void setMark(String mark) {
            this.mark = mark;
        }

        public String getUsable() {
            return CoinUtil.keepAsset(mark,usable);
        }

        public void setUsable(String usable) {
            this.usable = usable;
        }

        public String getFrost() {
            return CoinUtil.keepAsset(mark,frost);
        }

        public void setFrost(String frost) {
            this.frost = frost;
        }
    }
}
